package com.example.test14;

import com.example.test14.DI.UserController;
import com.example.test14.DI.UserController2;
import com.example.test14.DI.UserController3;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;


@SpringBootApplication
public class Test14Application {

    public static void main(String[] args) {
        ApplicationContext context=SpringApplication.run(Test14Application.class, args);
        User user =  context.getBean(User.class);
        System.out.println(user);

        UserController controller = context.getBean(UserController.class);
        System.out.println(controller);
        controller.usercontroller();

        UserController2 userController2= context.getBean(UserController2.class);
        userController2.usercontroller2();

        UserController3 userController3= context.getBean(UserController3.class);
        userController3.usercontroller3();
    }

}
